.dropdown {
  padding: 4px;
}

.label {
  color: var(--mantine-color-dimmed);
  font-weight: 500;
  font-size: var(--mantine-font-size-xs);
  padding: calc(var(--mantine-spacing-xs) / 2) var(--mantine-spacing-sm);
  cursor: default;
}

.divider {
  margin-top: 4px;
  margin-bottom: 4px;
  border-top: 1px solid;

  @mixin where-light {
    border-color: var(--mantine-color-gray-2);
  }

  @mixin where-dark {
    border-color: var(--mantine-color-dark-4);
  }
}

.item {
  font-size: var(--mantine-font-size-sm);
  width: 100%;
  padding: calc(var(--mantine-spacing-xs) / 1.5) var(--mantine-spacing-sm);
  border-radius: var(--popover-radius, var(--mantine-radius-default));
  color: var(--menu-item-color, var(--mantine-color-text));
  display: flex;
  align-items: center;
  user-select: none;

  &:where([data-disabled], :disabled) {
    color: var(--mantine-color-disabled-color);
    opacity: 0.6;
    cursor: not-allowed;
  }

  &:where(:hover, :focus) {
    &:where(:not(:disabled, [data-disabled])) {
      @mixin where-light {
        background-color: var(--menu-item-hover, var(--mantine-color-gray-1));
      }

      @mixin where-dark {
        background-color: var(--menu-item-hover, var(--mantine-color-dark-4));
      }
    }
  }

  &:where([data-sub-menu-item]) {
    padding-inline-end: 5px;
  }
}

.itemLabel {
  flex: 1;
}

.itemSection {
  display: flex;
  justify-content: center;
  align-items: center;

  &:where([data-position='left']) {
    margin-inline-end: var(--mantine-spacing-xs);
  }

  &:where([data-position='right']) {
    margin-inline-start: var(--mantine-spacing-xs);
  }
}

.chevron {
  transform: rotate(-90deg);

  @mixin where-rtl {
    transform: rotate(90deg);
  }
}
